﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAL;

namespace BLL
{
    public class GetUserInfoBLL
    {
        GetUserInfoDAL gd = new GetUserInfoDAL();
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="cardid"></param>
        /// <param name="qpassword"></param>
        /// <returns></returns>
        public int Pwdchange(string cardid, string qpassword)
        {
            return gd.Pwdchange(cardid, qpassword);
        }
        /// <summary>
        /// 获取原始密码
        /// </summary>
        /// <param name="cardid"></param>
        /// <returns></returns>
        public DataSet getypassword(string cardid)
        {
            return gd.getypassword(cardid);
        }
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="openid"></param>
        /// <returns></returns>
        public DataSet getUserInfo(string openid)
        {
            return gd.getUserInfo(openid);
        }






        /// <summary>
        /// 获取用户卡的状态
        /// </summary>
        /// <param name="openid"></param>
        /// <returns></returns>
        public DataSet getUserInfos(string openid)
        {
            return gd.getUserInfos(openid);
        }



        /// <summary>
        /// 获取充值赠送信息
        /// </summary>
        /// <param name="openid"></param>
        /// <returns></returns>
        public DataSet getCZZSInfo(string openid)
        {
            return gd.getCZZSInfo(openid);
        }
















        /// <summary>
        /// 获取充值记录
        /// </summary>
        /// <param name="openid"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public DataSet getRechargeInfo(string openid, string startTime, string endTime)
        {
            return gd.getRechargeCode(openid, startTime, endTime);
        }
        /// <summary>
        /// 获取消费记录
        /// </summary>
        /// <param name="openid"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public DataSet getConsumption(string openid, string startTime, string endTime)
        {
            return gd.getConsumptionRecodes(openid, startTime, endTime);
        }
        /// <summary>
        /// 获取增款总额
        /// </summary>
        /// <param name="openid"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public string getAddCount(string openid, string startTime, string endTime)
        {
            return gd.getAddsCount(openid, startTime, endTime);
        }
        /// <summary>
        /// 获取减款总额
        /// </summary>
        /// <param name="openid"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public string getDelCount(string openid, string startTime, string endTime)
        {
            return gd.getDelsCount(openid, startTime, endTime);
        }
        /// <summary>
        /// 获取消费总额
        /// </summary>
        /// <param name="openid"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public string getConsumCount(string openid, string startTime, string endTime)
        {
            return gd.getConsumptionCount(openid, startTime, endTime);
        }
        /// <summary>
        /// 获取openid
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public string getOpenid(string userID)
        {
            return gd.getOpenid(userID);
        }

        /// <summary>
        /// 得到统计金额
        /// </summary>
        /// <param name="time1"></param>
        /// <param name="time2"></param>
        /// <returns></returns>
        public DataTable getjeCount(String time1, String time2)
        {
            return gd.getjeCount(time1, time2);
        }

        /// <summary>
        /// 改变卡状态，挂失，解挂
        /// </summary>
        /// <param name="state">卡状态</param>
        /// <param name="cardNum">卡号</param>
        /// <returns></returns>
        public int changeCardState(string state, string cardNum)
        {
            return gd.changeCardState(state, cardNum);
        }
    }
}
